
from lingospot.misc import compose
from lingospot.frozendict import frozendict 

# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------

def unroll_tuple( inner ):
  return compose( inner, tuple )

def unroll_list( inner ):
  return compose( inner, list )

# -----------------------------------------------------------------------------

def unroll_frozenset( inner ):
  return compose( inner, frozenset )
  
def unroll_set( inner ):
  return compose( inner, set )
  
# -----------------------------------------------------------------------------

def unroll_frozendict( inner ):
  return compose( inner, frozendict )

def unroll_dict( inner ):
  return compose( inner, dict )

# -----------------------------------------------------------------------------

unroll = lambda: 'using unroll object as a namespace, for import convenience'

unroll.tuple = unroll_tuple
unroll.list = unroll_list

unroll.frozenset = unroll_frozenset
unroll.set = unroll_set

unroll.frozendict = unroll_frozendict
unroll.dict = unroll_dict


